<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
	response.setHeader("P3P", "CP=CAO PSA OUR");
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
  <head>
  <title>首页</title>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <link href="<%=request.getContextPath() %>/new_css/style.css" type="text/css" rel="stylesheet">
    <link href="<%=request.getContextPath() %>/V1/css/default.css" type="text/css" rel="stylesheet">
    <script language="javascript" src="<%=request.getContextPath() %>/V1/js/menu.js" type="text/javascript"></script>
    <script language="javascript" src="<%=request.getContextPath() %>/V1/js/iframeHelper.js" type="text/javascript"></script>
    <script type="text/javascript" src="<%=request.getContextPath() %>/jQuery/base/jquery-1.6.4.js"></script>
    <script type="text/javascript" src="<%=request.getContextPath() %>/jQuery/base/jquery.cookie.js"></script>
    <script type="text/javascript" src="<%=request.getContextPath() %>/jQuery/ui/jquery-ui-1.8.16.custom.min.js"></script>
     <link type="text/css" href="<%=request.getContextPath() %>/jQuery/ui/base/jquery.ui.all.css" rel="stylesheet" />
    <style>
#tabs li .ui-icon-close {
  float: left;
  margin: 0.4em 0.2em 0 0;
  cursor: pointer;
}
</style>
    <script type="text/javascript">
  var tab_counter = 1;
  var pageUrl = null;
  function js_reloadTabs() {
    $("#tabs").tabs(
        {
          tabTemplate : "<li><a href='#" + "{href}'>#"
              + "{label}</a> <span class='ui-icon ui-icon-close'>Remove Tab</span></li>",
          add : function(event, ui) {
            var appendContent = "<iframe src='" + pageUrl + "' style='width:100%; height:100%; border:0;'></iframe>";
            $(ui.panel).append(appendContent);
            $("#tabs").tabs("select", "#" + ui.panel.id);
          }
        });
    $("#tabs span.ui-icon-close").live("mouseup", function() {
      var index = $("#tabs li").index($(this).parent());
      $("#tabs").tabs("remove", index);
    });
  }
  function js_addTab(title, url) {
    pageUrl = url;
    tab_counter++;
    $("#tabs").tabs("add", "#tabs-" + tab_counter, title);
    $("#tabs-" + tab_counter).height($(window).height() - 120);
    $("#tabs-" + tab_counter).css("overflow", "auto");
  }
  $(document).ready(function() {
    js_reloadTabs();
    $(window).bind("resize", function() {
      $("#tabs div.ui-tabs-panel").height($(window).height() - 120);
    });
    $("#tabs-1").height($(window).height() - 120);
    $("#tabs-1").css("overflow", "auto");
    $.ajax({
      type : "POST",
      url : "register!GUserInfo.do",
      dataType : "json",
      data : $('#frm').serialize(),
      error : function() {
        alert("11");
      },
      success : function(data, textStatus) {
    	$('#userName').html(data.userBean.userName);        
        $('#userRole').html(data.userBean.roleName);
      }
    });
  }

  );
</script>
  </head>
  <body onload="javascript:border_left('left_tab1','left_menu_cnt1');">
    <form id="form1" runat="server">
      <table id="indextablebody" cellpadding="0">
        <thead>
          <tr>
            <th>
              <div id="logo1">
                <s:text name="Jbpm 4 Leave" />
              </div>
            </th>
            <th>
              <a style="color: #16547E">用户 ：<label id="userName"></label>
              </a>&nbsp;&nbsp;
              <a style="color: #16547E">身份 ：<label id="userRole"></label>
              </a>&nbsp;&nbsp;|&nbsp;&nbsp;
              <a href="javascript:window.location.href='user!loginOff.do'">安全退出</a>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td class="menu">
              <ul class="bigbtu">
                <li id="now01">
                  <a title="安全退出" href="javascript:window.location.href='user!loginOff.do'">安全退出</a>
                </li>
                <li id="now02">
                  <a title="更新缓冲" href="#">更新缓冲</a>
                </li>
              </ul>
            </td>
          </tr>
          <tr>
            <td class="t1">
              <div id="contents">
                <table cellpadding="0">
                  <tr class="t1">
                    <td>
                      <div class="menu_top">
                      </div>
                    </td>
                  </tr>
                  <tr class="t2">
                    <td>
                      <div id="menu" class="menu" style="padding-top: 20px">
                        <ul class="tabpage2">
                          <li id="left_tab1" title="系统" onClick="javascript:border_left('left_tab1','left_menu_cnt1');">
                            <span>系统</span>
                          </li>
                        </ul>
                        <div id="left_menu_cnt1" class="left_menu_cnt">
                          <ul id="dleft_tab1">
                            <li id="now11">
                              <a title="新建流程" href="JavaScript:js_addTab('新建流程','workflow!initAddWorkFlowPage.do');"><span>新建流程</span>
                              </a>
                            </li>
                            <li id="now12">
                              <a title="用户管理" href="JavaScript:js_addTab('用户管理','user!initUserPage.do')"><span>用户管理</span>
                              </a>
                            </li>
                            <li id="now13">
                              <a title="角色管理" href="JavaScript:js_addTab('角色管理','showRole!showRole.do');"><span>角色管理</span>
                              </a>
                            </li>
                            <li id="now14">
                              <a title="流程信息" href="JavaScript:js_addTab('流程信息','index!loadIndexPage.do');"><span>流程信息</span>
                              </a>
                            </li>
                          </ul>
                        </div>
                        <div class="clear">
                        </div>

                        <ul class="tabpage2">
                          <li id="left_tab2" onClick="javascript:border_left('left_tab2','left_menu_cnt2');" title="表单">
                            <span>表单</span>
                          </li>
                        </ul>
                        <div id="left_menu_cnt2" class="left_menu_cnt">
                          <ul id="dleft_tab2">
                            <li id="now11">
                              <a title="我的测试" href="JavaScript:js_addTab('我的测试','workflow!initFlow.do');"><span>我的测试</span>
                              </a>
                            </li>
                            <li id="now12">
                              <a title="创建审批单" href="JavaScript:js_addTab('待批培训信息','pendingB00101XB');"><span>待批培训信息</span>
                              </a>
                            </li>
                          </ul>
                        </div>
                        <div class="clear">
                        </div>

                        <ul class="tabpage2">
                          <li id="left_tab3" onClick="javascript:border_left('left_tab3','left_menu_cnt3');"
                            title="操作菜单">
                            <span>功能</span>
                          </li>
                        </ul>
                        <div id="left_menu_cnt3" class="left_menu_cnt">
                          <ul id="dleft_tab3">
                            <li id="now11">
                              <a title="员工管理" href="JavaScript:js_addTab('员工管理','loadM0010101');"><span>员工管理</span>
                              </a>
                            </li>
                            <li id="now11">
                              <a title="培训管理" href="JavaScript:js_addTab('培训管理','manageB00101XB');"><span>培训管理</span>
                              </a>
                            </li>
                            <li id="now11">
                              <a title="录入培训" href="JavaScript:js_addTab('录入培训','addB00101XA');"><span>录入培训</span>
                              </a>
                            </li>
                            <li id="now11">
                              <a title="查询员工" href="JavaScript:js_addTab('查询员工','employeeListB002IAXA');"><span>查询员工</span>
                              </a>
                            </li>
                            <li id="now11">
                              <a title="培训报表" href="JavaScript:js_addTab('培训报表','trainB002IAXA');"><span>培训报表</span>
                              </a>
                            </li>
                            <li id="now11">
                              <a title="综合导入" href="JavaScript:js_addTab('综合导入','loadB0030101');"><span>综合导入</span>
                              </a>
                            </li>

                          </ul>
                        </div>
                        <div class="clear">
                        </div>
                      </div>
                  <tr class="t3">
                    <td>
                      <div class="menu_end">
                      </div>
                    </td>
                  </tr>
                </table>
              </div>
            </td>
            <td class="t2" rowspan="2">
              <div id="body-wrapper">
                <div id="tabs" style="overflow: hidden;">
                  <ul>
                    <li>
                      <a href="#tabs-1">欢迎</a>
                    </li>
                  </ul>
                  <div id="tabs-1">
                  </div>
                </div>
              </div>
            </td>
          </tr>
        </tbody>
      </table>
    </form>
  </body>
</html>

